﻿using ACC.Data.Entities.Common;
using ACC.Extensions.PCClient.Entities;
using Spire.Pdf.General.Render.Decode.Jpeg2000.j2k.util;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;


namespace ACC.Extensions.PCClient.UserControls
{
    /// <summary>
    /// BarCodeListControl.xaml 的交互逻辑
    /// </summary>
    public partial class SettingListControl : UserControl
    {
        //前端列表数据源
        public List<ACCStnClientConfig> Settings;

        public SettingListControl()
        {
            InitializeComponent();
            Init();
        }

        /// <summary>
        /// 初始化
        /// </summary>
        public void Init()
        {
         //    Dispatcher.Invoke(new Action(() =>
        //    {
            lvSettings.ItemsSource = null;
            Settings = new List<ACCStnClientConfig>();
            lvSettings.ItemsSource = Settings;
            //      }));
        }

        public void FillSettings(List<ACCStnClientConfig> settings)
        {
         //   Dispatcher.Invoke(new Action(() =>
        //    {
            lvSettings.ItemsSource = null;
            Settings = settings;
            lvSettings.ItemsSource = Settings;
          //  }));     
        }

    }    
}
